#ifndef MAIN_H
#define MAIN_H

#include <QObject>

#include "httpserver.h"
#include "buddylist.h"
#include "collection/collection.h"

class NetworkConfig;
class RemoteMusicCollection;
class MainWindow;

/*! \brief Main class, program entry point.
 *
 * There isn't much to say about this class. See the run() method for more
 * details.
 */
class Main : public QObject
{
Q_OBJECT
public:
    /*! Construct the object with default options */
    Main();

    /*! Start the application */
    int run(int argc, char** argv);

private:
    NetworkConfig* networkConfig;
    HttpServer server;
    Playur::BuddyList* buddyList;
    MainWindow* mainWindow;
    Playur::Collection collection;
    
    bool local;

private slots:
    void networkReady();
    void buddyConnected(const QString& name);
};

#endif // MAIN_H
